package com.example.demo2.service.impl;

import com.example.demo2.entity.Content;
import com.example.demo2.mapper.ContentMapper;
import com.example.demo2.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.List;

@Service
public class ContentServiceImpl implements ContentService {
    @Autowired
    private ContentMapper contentMapper;
    @Override
    public List<Content> findContentAll(){

        return contentMapper.findContentAll();
    }
    @Override
    public List<Content> findByProCode(Integer proCode){

        return contentMapper.findByProCode(proCode);
    }
    @Override
    public List<Content> findByProName(String proName){

        return contentMapper.findByProName(proName);
    }
    @Override
    public boolean insertAudit(Integer userId, String userName, Timestamp userLoginTime, Timestamp userExitTime){

        return contentMapper.insertAudit(userId,userName,userLoginTime,userExitTime);
    }; //记录用户的登录登出操作

}
